﻿CREATE FUNCTION [dbo].[InitCap] (
 @string varchar(255)
)  
RETURNS varchar(255) AS


BEGIN 

SET @string = LTRIM(RTRIM(@string))

 RETURN upper(left(@string, 1)) + lower(right(@string, ABS(len(@string) - 1)))

END


